function imP = polar (I)

[F,C] = size(I);
Om = (F+1)/2;           
On = (C+1)/2;
sx = (F-1)/2;           
sy = (C-1)/2;
imP  = zeros(F,C);
delR = 1/(F-1);
delT = 2*pi/C;
for ri = 1:F
    for ti = 1:C
       r = (ri - 1)*delR;
       t = (ti - 1)*delT;
       x = r*cos(t);
       y = r*sin(t);
       xR = x*sx + Om;
       yR = y*sy + On;
       imP (ri, ti) = I(round(xR), round(yR));
    end
 end


